Finally, GMail is useful!

http://www.viksoe.dk/code/gmail.htm